<?php
//Represents a user

class Member {
	public $userId = NULL;
	public $firstName;
	public $lastName;
	public $userName;
	public $password;
	public $mail;
	public $ssn;
 	
 	/** I'm just keeping this text, ok. 
   * Copies the properties to their member variables, this is used instead of constructor to 
   * Let the objects be created with different parameters, main reason for this is that I use fetch_object
   * to create objects...
   * 
   * This can also be done by using default parameters in the constructor like this:
   *  public function __construct($title = "", $description = "", $price = 0, $categoryId = 0)
   * 
   * @param string $title
   * @param string $description
   * @param int $price
   * @param int $categoryId
   */
  
  //Create our prevalidation member. To make the validation easier. 
  public static function Create($firstName, $lastName, $userName, $password, $checkPassword, $mail, $ssn){
  	$member = new Member();
	
	$member->firstName = $firstName;
	$member->lastName = $lastName;
	$member->userName = $userName;
	$member->mail = $mail;
	$member->password = $password;
	$member->checkPassword = $checkPassword;
	$member->ssn = $ssn;
	
	return $member;
  }	
}